using System;

namespace IBNet
{
   /// <summary>
   /// Tick Generic Event Arguments
   /// </summary>
   public class TickGenericEventArgs : EventArgs
   {
      private readonly int requestId;
      private readonly TickType tickType;
      private readonly decimal value;

      /// <summary>
      /// Full Constructor
      /// </summary>
      /// <param name="requestId">The ticker Id that was specified previously in the call to reqMktData().</param>
      /// <param name="tickType">Specifies the type of price.</param>
      /// <param name="value">The value of the specified field.</param>
      public TickGenericEventArgs(int requestId, TickType tickType, decimal value)
      {
         this.requestId = requestId;
         this.value = value;
         this.tickType = tickType;
      }

      /// <summary>
      /// The ticker Id that was specified previously in the call to reqMktData().
      /// </summary>
      public int RequestId
      {
         get { return requestId; }
      }

      /// <summary>
      /// Specifies the type of price.
      /// </summary>
      /// <seealso cref="TickType"/>
      public TickType TickType
      {
         get { return tickType; }
      }

      /// <summary>
      /// The value of the specified field.
      /// </summary>
      public decimal Value
      {
         get { return value; }
      }
   }
}